package com.mcc.web.controller.monitor;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mcc.common.core.controller.BaseController;
import com.mcc.common.core.domain.AjaxResult;
import com.mcc.framework.web.domain.Server;

import java.util.function.Predicate;

/**
 * 服务器监控
 *
 * @author gxy
 */
@Api(tags = "服务器监控")
@ApiSort(3)
@RestController
@RequestMapping("/monitor/server")
public class ServerController extends BaseController {

    @ApiOperation("服务器信息")
    @ApiOperationSupport(order = 1)
    @PreAuthorize("@ss.hasPermi('monitor:server:list')")
    @GetMapping()
    public AjaxResult getInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return AjaxResult.success(server);
    }
}
